import MessageBox from '../components/MessageBox.vue'
import { createApp } from 'vue'

export default function (message: string) {
    const app = createApp(MessageBox, { message })
    const div = document.createElement('div')
    app.mount(div)
    document.body.appendChild(div)
    return () => {
        app.unmount()
        div.remove()
    }
}
